package com.bao.work;

public class Abstract02 {
    public static void main(String[] args) {
        Person[] ps=new Person[2];
        ps[0]=new Woman();
        ps[1]=new Man();
        for (Person person : ps) {
            person.pee();
        }
    }
}
abstract class Person{
    public abstract void pee();
    public abstract void eat();
}
class Woman extends Person{

    @Override
    public void pee() {
        System.out.println("坐着尿");
    }

    @Override
    public void eat() {

    }
}
class Man extends Person{
    @Override
    public void pee() {
        System.out.println("站着尿");
    }

    @Override
    public void eat() {

    }
}
